
// 登录
import login from '@/views/login';
// 首页
import index from '@/views/index';
/**
 * 基础菜单
 */
// 商品模块
import goods from '@/views/goods/Goods';
// 商品模块
import goodspp from '@/views/goods/GoodsPP';
// 商品模块
import goodsdw from '@/views/goods/GoodsDW';
// 商品模块
import goodsda from '@/views/goods/GoodsDA';
// 商品模块
import goodsdatj from '@/views/goods/GoodsDATJ';

// 采购模块
import Purchase from '@/views/purchase/Purchase';
import PurchaseOrder from '@/views/purchase/Purchase_order';
import PurchaseReturn from '@/views/purchase/Purchase_return';
import IncPurchase from '@/views/purchase/Purchase_operation/Inc_purchase';
import IncPurchaseOrder from '@/views/purchase/Purchase_order_operation/Inc_purchase_order';
import IncPurchaseReturn from '@/views/purchase/Purchase_return_operation/Inc_purchase_return';
// 库存模块
import stock from '@/views/stock/stock';
//商品入库
import EnterStock from '@/views/stock/enterstock/EnterStock';
//入库单详情
import DetailEnterStock from '@/views/stock/enterstock/DetailEnterStock';
//新增入库单
import SaveEnterStock from '@/views/stock/enterstock/SaveEnterStock';
//修改入库单
import UpdateEnterStock from '@/views/stock/enterstock/UpdateEnterStock';
//审核入库单
import HandleEnterStock from '@/views/stock/enterstock/HandleEnterStock';
//商品调拨
import Allocation from '@/views/stock/allocation/Allocation';
//调单详情
import DetailAllocation from '@/views/stock/allocation/DetailAllocation';
//新增调拨单
import SaveAllocation from '@/views/stock/allocation/SaveAllocation';
//修改挑拨单
import UpdateAllocation from '@/views/stock/allocation/UpdateAllocation';
//审核调拨单
import HandleAllocation from '@/views/stock/allocation/HandleAllocation';
//商品出库
import OutStock from '@/views/stock/outstock/OutStock';
//出库单详情
import DetailOutStock from '@/views/stock/outstock/DetailOutStock';
//新增出库单
import SaveOutStock from '@/views/stock/outstock/SaveOutStock';
//修改出库单
import UpdateOutStock from '@/views/stock/outstock/UpdateOutStock';
//审核出库单
import HandleOutStock from '@/views/stock/outstock/HandleOutStock';
//商品盘点
import CheckStock from '@/views/stock/checkstock/CheckStock';
//盘点单详情
import DetailCheckStock from '@/views/stock/checkstock/DetailCheckStock';
//新增盘点单
import SaveCheckStock from '@/views/stock/checkstock/SaveCheckStock';
//修改盘点单
import UpdateCheckStock from '@/views/stock/checkstock/UpdateCheckStock';
//审核盘点单
import HandleCheckStock from '@/views/stock/checkstock/HandleCheckStock';
//商品库存
import Stock from '@/views/stock/stock/Stock';
//商品库存详情
import DetailStock from '@/views/stock/detailstock/DetailStock';
// 促销模块
import OrderPromotion from '@/views/promotion/OrderPromotion';//订单促销
import AddPromotion from '@/views/promotion/AddPromotion';//增加订单促销
import GoodsPromotion from '@/views/promotion/GoodsPromotion';//商品促销
import AddPromotion2 from '@/views/promotion/AddPromotion2';//增加商品促销

// 零售模块
import retail from '@/views/retail/retail';
import salespage from '@/views/retail/view/salespage';
import salesListpage from '@/views/retail/view/salesListpage';
import returnpage from '@/views/retail/view/returnpage';
import mallsales from '@/views/retail/view/mallsales';
import transaction from '@/views/retail/view/transaction';
import financialpage from '@/views/retail/view/financialpage';
import transactionsummary from '@/views/retail/view/transactionsummary';
import financialrefundsummary from '@/views/retail/view/financialrefundsummary';
import financialcashiersummary from '@/views/retail/view/financialcashiersummary';
import saleslistdetailspage from '@/views/retail/view/saleslistdetailspage';
import productreturnpage from '@/views/retail/view/productreturnpage';
// 会员模块
import memberType from '@/views/member/MemberType';
import memberList from '@/views/member/MemberList';

//系统日志
import loginLog from '@/views/log/LoginLog';
import operationLog from '@/views/log/OperationLog';

// 系统模块
import changepassword from '@/views/system/changepassword';
import department from '@/views/system/department';
// 系统模块
import system from '@/views/system/personal';
import rolemanage from '@/views/system/rolemanage';
import useraccount from '@/views/system/useraccount';
import Vue from 'vue';
import Router from 'vue-router';


//商户资料
import MerchantInformation from '@/views/system/MerchantInformation';
//门店管理
import StoreManager from '@/views/system/StoreManager';
//终端管理
import TerminalManager from '@/views/system/TerminalManager';
//购买服务
import PurchaseServices from '@/views/system/PurchaseServices';
//申请发票
import ApplyInvoice from '@/views/system/ApplyInvoice';
//发票管理
import InvoiceManager from '@/views/system/InvoiceManager';
//新增门店
import EditStore from '@/views/system/EditStore';
//购买记录
import PurchaseServiceManager from '@/views/system/PurchaseServiceManager';



// 系统模块







//系统的消息模块路由  hxy

import BusinessMessage from '@/views/system/message/BusinessMessage';
import SystemMessage from '@/views/system/message/SystemMessage';
import UpgradeMessage from '@/views/system/message/UpgradeMessage';



// 启用路由
Vue.use(Router);

// 导出路由 
export default new Router({
    routes: [{
        path: '/',
        name: '',
        component: login,
        hidden: true,
        meta: {
            requireAuth: false
        }
    }, {
        path: '/login',
        name: '登录',
        component: login,
        hidden: true,
        meta: {
            requireAuth: false
        }
    }, {
        path: '/index',
        name: '首页',
        component: index,
        iconCls: 'el-icon-tickets',
        children: [{
            path: '/goods/Goods',
            name: '商品种类',
            component: goods,
            meta: {
                requireAuth: true
            }
        },{
          path: '/goods/GoodsPP',
          name: '商品品牌',
          component: goodspp,
          meta: {
              requireAuth: true
          }
      },{
        path: '/goods/GoodsDW',
        name: '商品单位',
        component: goodsdw,
        meta: {
            requireAuth: true
              }
          },{
            path: '/goods/GoodsDA',
            name: '商品档案',
            component: goodsda,
            meta: {
                requireAuth: true
            }
        }, {
          path: '/goods/GoodsDATJ',
          name: '商品档案添加',
          component: goodsdatj,
          meta: {
              requireAuth: true
          }
      }, {
          path: '/purchase/purchase',
          name: '采购模块',
          component: Purchase,
          meta: {
            requireAuth: true
          }

        }
          , {
            path: '/purchase/purchase_order',
            name: '采购模块',
            component: PurchaseOrder,
            meta: {
              requireAuth: true
            }

          }
          , {
            path: '/purchase/purchase_return',
            name: '采购模块',
            component: PurchaseReturn,
            meta: {
              requireAuth: true
            }

          }
          , {
            path: '/purchase/inc_purchase',
            name: '采购模块',
            component: IncPurchase,
            meta: {
              requireAuth: true
            }

          }
          , {
            path: '/purchase/inc_purchase_order',
            name: '采购模块',
            component: IncPurchaseOrder,
            meta: {
              requireAuth: true
            }

          },{
            path: '/purchase/inc_purchase_return',
            name: '采购模块',
            component: IncPurchaseReturn,
            meta: {
              requireAuth: true
            }

          }, {
          path: '/stock/stock',
          name: '库存模块',
          component: stock,
          meta: {
            requireAuth: true
          }
        },
          //赵雄伟：库存-商品入库模块路由配置
          {
            path: '/stock/enterstock/EnterStock',
            name: '商品入库',
            component: EnterStock,
            meta: {
              requireAuth: true
            }
          },
          /*赵雄伟：商品入库附属模块路由配置*/
          {
            path: '/stock/enterstock/DetailEnterStock',
            name: '入库单详情',
            component: DetailEnterStock,
            meta: {
              requireAuth: true
            }
          },
          /*赵雄伟：商品入库附属模块路由配置*/
          {
            path: '/stock/enterstock/SaveEnterStock',
            name: '新增入库单',
            component: SaveEnterStock,
            meta: {
              requireAuth: true
            }
          },
          /*赵雄伟：商品入库附属模块路由配置*/
          {
            path: '/stock/enterstock/UpdateEnterStock',
            name: '修改入库单',
            component: UpdateEnterStock,
            meta: {
              requireAuth: true
            }
          },
          /*赵雄伟：商品入库附属模块路由配置*/
          {
            path: '/stock/enterstock/HandleEnterStock',
            name: '审核入库单',
            component: HandleEnterStock,
            meta: {
              requireAuth: true
            }
          },
          //赵雄伟：库存-商品调拨模块
          {
            path: '/stock/allocation/Allocation',
            name: '商品调拨',
            component: Allocation,
            meta: {
              requireAuth: true
            }
          },
          /*赵雄伟：商品调拨附属模块路由配置*/
          {
            path: '/stock/allocation/DetailAllocation',
            name: '调拨单详情',
            component: DetailAllocation,
            meta: {
              requireAuth: true
            }
          },
          /*赵雄伟：商品调拨附属模块路由配置*/
          {
            path: '/stock/allocation/SaveAllocation',
            name: '新增调拨单',
            component: SaveAllocation,
            meta: {
              requireAuth: true
            }
          },
          /*赵雄伟：商品调拨附属模块路由配置*/
          {
            path: '/stock/allocation/UpdateAllocation',
            name: '修改调拨单',
            component: UpdateAllocation,
            meta: {
              requireAuth: true
            }
          },
          /*赵雄伟：商品调拨附属模块路由配置*/
          {
            path: '/stock/allocation/HandleAllocation',
            name: '审核调拨单',
            component: HandleAllocation,
            meta: {
              requireAuth: true
            }
          },
          //赵雄伟：库存-商品出库模块路由配置
          {
            path: '/stock/outstock/OutStock',
            name: '商品出库',
            component: OutStock,
            meta: {
              requireAuth: true
            }
          },
          /*赵雄伟：商品出库附属模块路由配置*/
          {
            path: '/stock/outstock/DetailOutStock',
            name: '出库单详情',
            component: DetailOutStock,
            meta: {
              requireAuth: true
            }
          },
          /*赵雄伟：商品出库附属模块路由配置*/
          {
            path: '/stock/outstock/SaveOutStock',
            name: '新增出库单',
            component: SaveOutStock,
            meta: {
              requireAuth: true
            }
          },
          /*赵雄伟：商品出库附属模块路由配置*/
          {
            path: '/stock/outstock/UpdateOutStock',
            name: '修改出库单',
            component: UpdateOutStock,
            meta: {
              requireAuth: true
            }
          },
          /*赵雄伟：商品出库附属模块路由配置*/
          {
            path: '/stock/outstock/HandleOutStock',
            name: '审核出库单',
            component: HandleOutStock,
            meta: {
              requireAuth: true
            }
          },
          //赵雄伟：库存-商品盘点模块路由配置
          {
            path: '/stock/checkstock/CheckStock',
            name: '商品盘点',
            component: CheckStock,
            meta: {
              requireAuth: true
            }
          },
          /*赵雄伟：商品盘点附属模块路由配置*/
          {
            path: '/stock/checkstock/DetailCheckStock',
            name: '盘点单详情',
            component: DetailCheckStock,
            meta: {
              requireAuth: true
            }
          },
          /*赵雄伟：商品盘点附属模块路由配置*/
          {
            path: '/stock/checkstock/SaveCheckStock',
            name: '新增盘点单',
            component: SaveCheckStock,
            meta: {
              requireAuth: true
            }
          },
          /*赵雄伟：商品盘点附属模块路由配置*/
          {
            path: '/stock/checkstock/UpdateCheckStock',
            name: '修改盘点单',
            component: UpdateCheckStock,
            meta: {
              requireAuth: true
            }
          },
          /*赵雄伟：商品盘点附属模块路由配置*/
          {
            path: '/stock/checkstock/HandleCheckStock',
            name: '审核盘点单',
            component: HandleCheckStock,
            meta: {
              requireAuth: true
            }
          },
          //赵雄伟：库存-商品库存模块路由配置
          {
            path: '/stock/stock/Stock',
            name: '商品库存',
            component: Stock,
            meta: {
              requireAuth: true
            }
          },
          //赵雄伟：库存-商品库存详情模块路由配置
          {
            path: '/stock/detailstock/DetailStock',
            name: '商品库存详情',
            component: DetailStock,
            meta: {
              requireAuth: true
            }
          }, {
          path: '/promotion/OrderPromotion',
          name: '订单促销',
          component: OrderPromotion,
          meta: {
            requireAuth: true
          }
        }, {
          path: '/promotion/AddPromotion',
          name: '增加订单促销',
          component: AddPromotion,
          meta: {
            requireAuth: true
          },
        },
          {
          path: '/promotion/GoodsPromotion',
          name: '商品促销',
          component: GoodsPromotion,
          meta: {
            requireAuth: true
          }
        },
          {
            path: '/promotion/AddPromotion2',
            name: '增加商品促销',
            component: AddPromotion2,
            meta: {
              requireAuth: true
            }
          },
          {
          path: '/retail/retail',
          name: '零售模块',
          component: retail,
          meta: {
            requireAuth: true
          }
        },
          {
            path: '/retail/returnpage',
            name: '零售模块',
            component: returnpage,
            meta: {
              requireAuth: true
            }
          },
          {
            path: '/retail/mallsales',
            name: '零售模块',
            component: mallsales,
            meta: {
              requireAuth: true
            }
          },
          {
            path: '/retail/transaction',
            name: '零售模块',
            component: transaction,
            meta: {
              requireAuth: true
            }
          },

          {
            path: '/retail/salespage',
            name: '零售模块',
            component: salespage,
            meta: {
              requireAuth: true
            }
          },
          {
            path: '/retail/salesListpage',
            name: '零售模块',
            component: salesListpage,
            meta: {
              requireAuth: true
            }
          },
          {
            path: '/retail/financialpage',
            name: '零售模块',
            component: financialpage,
            meta: {
              requireAuth: true
            }
          },
          {
            path: '/retail/transactionsummary',
            name: '零售模块',
            component: transactionsummary,
            meta: {
              requireAuth: true
            }
          },
          {
            path: '/retail/financialcashiersummary',
            name: '零售模块',
            component: financialcashiersummary,
            meta: {
              requireAuth: true
            }
          },
          {
            path: '/retail/financialrefundsummary',
            name: '零售模块',
            component: financialrefundsummary,
            meta: {
              requireAuth: true
            }
          },
          {
            path: '/saleslistdetailspage/:id',
            name: '零售模块',
            component: saleslistdetailspage,
            meta: {
              requireAuth: true
            }
          },
          {
            path: '/productreturnpage/:id',
            name: '零售模块',
            component: productreturnpage,
            meta: {
              requireAuth: true
            }
          },

          {
            path: '/member/MemberList',
            name: '会员列表',
            component: memberList,
            meta: {
              requireAuth: true
            }
          },{
            path: '/member/MemberType',
            name: '会员类别',
            component: memberType,
            meta: {
              requireAuth: true
            }
          },  {
            path: '/log/LoginLog',
            name: '登录日志',
            component: loginLog,
            meta: {
              requireAuth: true
            }
          }, {
            path: '/log/OperationLog',
            name: '操作日志',
            component: operationLog,
            meta: {
              requireAuth: true
            }
          },

          /*杨灿 路由配置*/
          {
            path: '/system/MerchantInformation',
            name: '商户资料',
            component: MerchantInformation,
            meta: {
              requireAuth: true
            }
            },
          {
            path: '/system/personal',
            name: '系统模块/个人信息',
            component: system,
            meta: {
              requireAuth: true
            }
        },
        {
          path: '/system/changepwd',
          name: '系统模块/修改密码',
          component: changepassword,
          meta: {
            requireAuth: true
          }
      },
        {
          path: '/system/department',
          name: '系统模块/部门设置',
          component: department,
          meta: {
            requireAuth: true
          }
      },
      {
        path: '/system/useraccount',
        name: '系统模块/员工账号',
        component: useraccount,
        meta: {
          requireAuth: true
        }
      },
      {
        path: '/system/rolemanage',
        name: '系统模块/角色管理',
        component: rolemanage,
        meta: {
          requireAuth: true
        }
     },   {
            path: '/system/StoreManager',
            name: '门店管理',
            component: StoreManager,
            meta: {
              requireAuth: true
            }
          },
          {
            path: '/system/TerminalManager',
            name: '终端管理',
            component: TerminalManager,
            meta: {
              requireAuth: true
            }
          },
          {
            path: '/system/PurchaseServices',
            name: '购买服务',
            component: PurchaseServices,
            meta: {
              requireAuth: true
            }
          },
          {
            path: '/system/ApplyInvoice',
            name: '申请发票',
            component: ApplyInvoice,
            meta: {
              requireAuth: true
            }
          },
          {
            path: '/system/InvoiceManager',
            name: '发票记录',
            component: InvoiceManager,
            meta: {
              requireAuth: true
            }
          },
          {
            path: '/system/EditStore',
            name: '新增门店',
            component: EditStore,
            meta: {
              requireAuth: true
            }
          },{
            path: '/system/PurchaseServiceManager',
            name: '购买记录',
            component: PurchaseServiceManager,
            meta: {
              requireAuth: true
            }
          },
          {
            path: '/sys/BusinessMessage',
            name: '业务消息',
            component: BusinessMessage,
            meta: {
              requireAuth: true
            }
          },
          {
            path: '/sys/SystemMessage',
            name: '系统公告',
            component: SystemMessage,
            meta: {
              requireAuth: true
            }
          },
          {
            path: '/sys/UpgradeMessage',
            name: '升级公告',
            component: UpgradeMessage,
            meta: {
              requireAuth: true
            }
          }

        ]
    }]
})
